public class Card implements Comparable <Card>{

	private final int value;
	private final int suit;
	
	Card(int v, int s) throws BadugiException{
		if(v < 1||v > 13) throw new BadugiException("Card value is out of range!");
		if(s < 1||s > 4) throw new BadugiException("Card suit is out of range!");
		value = v;
		suit = s;
	}

	public int getValue(){
		return this.value;
	}

	public int getSuit() {
		return this.suit;
	}
	
	public int compareTo(Card other) {
		
		return this.value-other.getValue();
			
	}
	
	public boolean isSame(Card other){
		if(other.getValue()==this.value && other.getSuit()==this.suit) return true;
		else return false;
	}
	
}
